<?php
$controllerName = $this->shopHelper()->getController();
$actionName     = $this->shopHelper()->getAction();
?>
<div class="uc-nav-box">
    <div class="box-hd">
        <h3 class="title"><?php echo $this->translate('用户中心'); ?></h3>
    </div>
    <div class="box-bd">
        <ul class="uc-nav-list">
            <li <?php if ($controllerName == 'HomeController') echo 'class="current"'; ?>><a href="<?php echo $this->url('shop-home'); ?>"><?php echo $this->translate('中心首页'); ?></a></li>
            <li <?php if ($controllerName == 'HomeOrderController' && !in_array($actionName, ['orderGoodsVirtual'])) echo 'class="current"'; ?>><a href="<?php echo $this->url('home-order'); ?>"><?php echo $this->translate('我的订单'); ?></a></li>
            <li <?php if ($controllerName == 'HomeOrderController' && in_array($actionName, ['orderGoodsVirtual'])) echo 'class="current"'; ?>><a href="<?php echo $this->url('home-order', ['action' => 'orderGoodsVirtual']); ?>"><?php echo $this->translate('虚拟商品'); ?></a></li>
            <li <?php if ($controllerName == 'HomeUserBalanceController' && !in_array($actionName, ['userWithdraw', 'addUserWithdraw'])) echo 'class="current"'; ?>><a href="<?php echo $this->url('home-user-balance'); ?>"><?php echo $this->translate('账户余额'); ?></a></li>
            <li <?php if ($controllerName == 'HomeUserBalanceController' && in_array($actionName, ['userWithdraw', 'addUserWithdraw'])) echo 'class="current"'; ?>><a href="<?php echo $this->url('home-user-balance', ['action' => 'userWithdraw']); ?>"><?php echo $this->translate('余额提现'); ?></a></li>
            <li <?php if ($controllerName == 'HomeUserCouponController') echo 'class="current"'; ?>><a href="<?php echo $this->url('home-user-coupon'); ?>"><?php echo $this->translate('优惠券'); ?></a></li>
            <li <?php if ($controllerName == 'HomeServiceController') echo 'class="current"'; ?>><a href="<?php echo $this->url('shop-service', ['action' => 'returnAndChangeList']); ?>"><?php echo $this->translate('退换货/售后'); ?></a></li>
            <li <?php if ($controllerName == 'HomeUserIntegralController') echo 'class="current"'; ?>><a href="<?php echo $this->url('home-user-integral'); ?>"><?php echo $this->translate('我的积分'); ?></a></li>
            <li <?php if ($controllerName == 'HomeFavoritesController') echo 'class="current"'; ?>><a href="<?php echo $this->url('home-favorites'); ?>"><?php echo $this->translate('我的收藏'); ?></a></li>
            <li <?php if ($controllerName == 'HomeUserAddressController') echo 'class="current"'; ?>><a href="<?php echo $this->url('home-user-addr'); ?>"><?php echo $this->translate('地址管理'); ?></a></li>
            <li <?php if ($controllerName == 'HomeSecurityController') echo 'class="current"'; ?>><a href="<?php echo $this->url('home-security'); ?>"><?php echo $this->translate('账户安全'); ?></a></li>
            <li <?php if ($controllerName == 'HomeUserController') echo 'class="current"'; ?>><a href="<?php echo $this->url('home-user'); ?>"><?php echo $this->translate('账户信息'); ?></a></li>
            <li><a href="<?php echo $this->url('shop-user', ['action'=>'userLogout']); ?>"><?php echo $this->translate('用户退出'); ?></a></li>
        </ul>
    </div>
</div>